<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link href="/static/css/admin/style_new2019.css" rel="stylesheet"/>
	<link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
	<title><?php echo L('website_manage');?></title>
	<script>
	var URL = '/index.php/Admin/File';
	var SELF = '/index.php?m=Admin&amp;c=file&amp;a=index&amp;menuid=415';
	var PAGE = '/index.php?m=Admin&amp;c=file&amp;a=index&amp;menuid=415';
	var ROOT_PATH = '';
	var APP	 =	 '/index.php';
	//语言项目
	var lang = new Object();
	lang.connecting_please_wait = "请稍后...";
	lang.confirm_title = "提示消息";
	lang.move = "移动";
	lang.title_empty = "请输入宝贝名称";
	lang.iid_empty = "IID不能为空";
	lang.dialog_title = "消息";
	lang.dialog_ok = "确定";
	lang.dialog_cancel = "取消";
	lang.please_input = "请输入";
	lang.please_select = "请选择";
	lang.not_select = "不选择";
	lang.all = "所有";
	lang.input_right = "输入正确";
	lang.plsease_select_rows = "请选择要操作的项目！";
	lang.upload = "上传";lang.uploading = "上传中";
	lang.upload_type_error = "不允许上传的文件类型！";
	lang.upload_size_error = "文件大小不能超过{sizeLimit}！";
	lang.upload_minsize_error = "文件大小不能小于{minSizeLimit}！";
	lang.upload_empty_error = "文件为空，请重新选择！";
	lang.upload_nofile_error = "没有选择要上传的文件！";
	lang.upload_onLeave = "正在上传文件，离开此页将取消上传！";
	lang.menu_name="菜单名称";
	lang.module_name="模块名";
	lang.action_name="方法名";
	</script>
</head>

<body>

<div id="J_ajax_loading" class="ajax_loading"><?php echo L('ajax_loading');?></div>
<div style="height: 20px;width: 100%"></div>
<?php if(($sub_menu != '') OR ($big_menu != '')): ?><div class="subnav">
    <div class="content_menu ib_a blue line_x">
    	<?php if(!empty($big_menu)): ?><a class="add fb J_showdialog" href="javascript:void(0);" data-uri="<?php echo ($big_menu["iframe"]); ?>" data-title="<?php echo ($big_menu["title"]); ?>" data-id="<?php echo ($big_menu["id"]); ?>" data-width="<?php echo ($big_menu["width"]); ?>" data-height="<?php echo ($big_menu["height"]); ?>"><em><?php echo ($big_menu["title"]); ?></em></a>　<?php endif; ?>
        <?php if(!empty($sub_menu)): if(is_array($sub_menu)): $key = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($key % 2 );++$key; if($key != 1): ?><span>|</span><?php endif; ?>
        <a href="<?php echo U($val['module_name'].'/'.$val['action_name'],array('menuid'=>$menuid)); echo ($val["data"]); ?>" class="<?php echo ($val["class"]); ?>"><em><?php echo ($val['name']); ?></em></a><?php endforeach; endif; else: echo "" ;endif; endif; ?>
    </div>
</div><?php endif; ?>
<div class="pad_lr_10" >
    <form name="searchform" method="get" >
        <table width="100%" cellspacing="0" class="search_form">
            <tbody>
            <tr>
                <td>
                    <div class="explain_col">
                        创建时间：
                        <input type="text" name="time_start" id="time_start" class="date" size="12" value="<?php echo ($search["time_start"]); ?>" readonly>
                        -
                        <input type="text" name="time_end" id="time_end" class="date" size="12" value="<?php echo ($search["time_end"]); ?>" readonly>
                        &nbsp;&nbsp;附件名 :
                        <input name="name" type="text" class="input-text" size="25" value="<?php echo ($search["name"]); ?>" />
                        <input type="submit" name="search" class="btn" value="搜索" />
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </form>

    <div class="J_tablelist table_list" data-acturi="<?php echo U('article/ajax_edit');?>">
        <table width="100%" cellspacing="0">
            <thead>
            <tr>
                <th width=25><input type="checkbox" id="checkall_t" class="J_checkall"></th>
                <th><span data-tdtype="order_by" data-field="id">ID</span></th>
                <th align="left"><span data-tdtype="order_by" data-field="name">附件名</span></th>
                <th align="left"><span data-tdtype="order_by" data-field="order_id">客户名</span></th>
                <th align="left">客户电话</th>
                <th align="left"><span data-tdtype="order_by" data-field="cate_id">分类名</span></th>
                <th align="left"><span data-tdtype="order_by" data-field="type">类型</span></th>
                <th align="left"><span data-tdtype="order_by" data-field="size">大小</span></th>
                <th align="left"><span data-tdtype="order_by" data-field="create_user_id">上传者</span></th>
                <th align="left"><span data-tdtype="order_by" data-field="status">状态</span></th>
                <th align="left" width=150><span data-tdtype="order_by" data-field="createtime">创建时间</span></th>
                <th align="left" width="120">操作</th>
            </tr>
            </thead>
            <tbody>
            <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><tr>
                    <td align="center"><input type="checkbox" class="J_checkitem" value="<?php echo ($val["id"]); ?>"></td>
                    <td align="center"><?php echo ($val["id"]); ?></td>
                    <td><a target="_blank" href="/Files/<?php echo ($val['savepath']); echo ($val['name']); ?>" style="color: #3f913f;font-weight: bold;"><?php echo ($val['original']); ?></a></td>
                    <td><?php echo ($order_info[$val['order_id']]['name']); ?></td>
                    <td><?php echo ($order_info[$val['order_id']]['mobile']); ?></td>
                    <td><?php echo ($cate_list[$val['cate_id']]); ?></td>
                    <td><?php echo ($val["type"]); ?></td>
                    <td><?php echo ($val["size"]); ?></td>
                    <td><?php echo ($user_info[$val['create_user_id']]['user_name']); ?></td>
                    <td><?php echo ($status_name[$val['status']]); ?></td>
                    <td><?php echo date('Y-m-d H:i:s',$val['createtime']);?></td>
                    <td>
                        <a href="javascript:void(0);" class="J_confirmurl" data-acttype="ajax" data-uri="<?php echo U('File/delete', array('id'=>$val['id']));?>" data-msg="删除 - <?php echo ($val['original']); ?> -这个附件">删除</a>
                    </td>
                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
            </tbody>
        </table>
        <?php if($_GET['perpage']> 10): ?><div style="height: 60px;"></div><?php endif; ?>
        <div class="btn_wrap_fixed">
            <label class="select_all"><input type="checkbox" name="checkall" class="J_checkall">全选/取消</label>
            <input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="<?php echo U('File/delete');?>?ok=1" data-name="id" data-msg="确认删除" value="删除" />
            <div id="pages"><?php echo ($page); ?></div>
        </div>
    </div>
</div>
<script src="/static/js/jquery/jquery.js"></script>
<script src="/static/js/jquery/plugins/jquery.tools.min.js"></script>
<script src="/static/js/jquery/plugins/formvalidator.js"></script>
<script src="/static/js/yhxia.js"></script>
<script src="/static/js/admin.js"></script>
<script src="/static/js/dialog.js"></script>
<script>
//初始化弹窗   errNum   retData    errMsg
(function (d) {
    d['okValue'] = lang.dialog_ok;
    d['cancelValue'] = lang.dialog_cancel;
    d['title'] = lang.dialog_title;
})($.dialog.defaults);
</script>

<?php if(isset($list_table)): ?><script src="/static/js/jquery/plugins/listTable.js"></script>
<script>
$(function(){
	$('.J_tablelist').listTable();
});
</script><?php endif; ?>
<link rel="stylesheet" type="text/css" href="/static/js/calendar/calendar-blue.css"/>
<script src="/static/js/calendar/calendar.js"></script>
<script>
    $('#article_search_cate_id').val('<?php echo ($search["cate_id"]); ?>');
    $('.J_cate_select').cate_select({top_option:lang.all});
    Calendar.setup({
        inputField : "time_start",
        ifFormat   : "%Y-%m-%d",
        showsTime  : false,
        timeFormat : "24"
    });
    Calendar.setup({
        inputField : "time_end",
        ifFormat   : "%Y-%m-%d",
        showsTime  : false,
        timeFormat : "24"
    });
</script>
</body>
</html>